You are right about that, but I think I have come up with a way to solve that issue, as in "storing the second penalty for later on".
Just haven't got the time to work it out tonight, so will come back to the subject in the next few days.
Have a go with the attached script.
It does all that you asked for, except the blinking yellow lights on main, as there is no yellow state on them.
So made them blink red.
I've put the commands !ylw , !rdy , !grn under my F5,F6,F7 (you need to do that in your own LFS settings (see screenshot) and it's working as intended.
Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
-Added code to give one point for every completed lap
-Added code for a ranking system
-Added code to delete stored rank when using !delpoints command
-Added code to cap maximum number of points at 50000
-Added code to make rank visible when using !point and !rank command
-Fixed a bug in !point and !rank where Flagnear wasn't working
Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
- Removed "$ps_max_points=10" from OnLapperStart as it no longer has a purpose
- Made the display of points earned dynamic
- Added option (only for admins) to delete all points related records from the database
Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
I have looked into your script and it turned out that an ENDIF was missing.
There was also too much complicated code to make the rank-cases work, so I have re-written that:
<?php SWITCH( $command )
CASE "!promote": IF ( UserIsAdmin( $userName ) == 1 ) THEN IF ( $argv != "" ) THEN $idxSpace = indexOf( $argv, " "); IF ( $idxSpace != -1 ) THEN $pl_name = subStr( $argv,0,$idxSpace ); #user- or nickname $rank = trim( subStr( $argv,$idxSpace ) ); #rank
IF ( $rank != "") THEN SWITCH ( ToLower($rank) )
CASE "cadet": privMsg( "test" ); IF ( UserInGroup( "Police",$pl_name ) == 1 ) THEN privMsg( "^7User is already A Officer!!!"); ELSE MoveUserToGroup( "Police",$pl_name ); UserGroupToFile( "Police", $Dir["Police"] ); GlobalMsg( langEngine( "%{cruise_cop_new}%",$pl_name) ); ENDIF BREAK;
This is a question about Lapper and should have gone into the Lapper forum section. Maybe a moderator can direct this thread to the correct forum?
I will look into your question and will come up with an answer.
Day/night , weather , visual improvements would add to the overal feeling the game has, but it won't make it a better simulator.
The new tyre model that is being developed will.
If all goes to plan, the next update (no promises, no estimate when it will be read) should include the new tyre mode, day/night cycle and moving DirectX up to version 11 (coming from 9), which will give the graphics artist (Erik) a lot more options, while he has already given most tracks (every track when the new update goes live) a huge graphical update.
You might want to read these articles, written by Scawen:
It shows you how much is going on and what has been worked on.
LFS is very much alive, but with a single developer and one graphics artist, things go slow, but steady and with always the highest quality possible in mind. https://www.lfs.net/forum/thread/93420-April-Progress-Report
I have stopped reading after point 1a. You clearly have no idea how LFS is developed (by a single guy) and that it isn't being developed to make as much money as possible, but to make the best simulator possible.
Modding has been suggested many times before and Scawen (dev of LFS) has said that at the moment he has no intention to open up the game for officially supported mods or modding of the game.
- Added code to give extra points to the player that drove the fastest lap of the race (Yisc[NL])
- Removed several lines of closeGlobalButton, since the button ID's that were closed were not in use (Yisc[NL])
Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Credits to:
Tim NL - For creating the initial script
Bass-Driver - For making the code to show a toplist
The messages are just the messages and can never trigger a race start, unless some other code is active to do such thing. If you want me to, I can have a look at the full script and see if I can find what causes these starts. Feel free to send me a private message, so I can share my email address with you, which then allows you to send me your script (or if you have multiple ones, the full Lapper directory).
Welcome text needs to go into the OnConnect event.
I made this for the team (AB.nl) I am developing things for:
I have converted the script made by Tim NL into a Lapper module and adjusted the code if needed (some functions he used, have been removed from Lapper).
Here's the new module, that has been tested by me, but needs the score of a couple of people to see if it is really working like it should.
Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Credits to:
Tim NL - For creating the initial script
Bass-Driver - For making the code to show a toplist
Are you sure that is caused by Lapper?
I mean, people can just vote to start a race, which is an LFS function and not a Lapper function.
The code you disabled hasn't got anything to do with starting a race.
globalMsg = messages send to everyone who is on the server
privMsg = messages send to that particular player, who triggered the event
Over night I have been thinking about how this blue flag penalty could be implemented, but it doesn't seem to be a straight forward thing.
When a player is slow for a reason (skills, technical issue on the car, been in an accident, etc.) the whole field will lap him/her at some point. That means a lot of blue flags will be given, but only counting them isn't doing justice to the player that gets them. I mean, maybe he/she moves out of the way ASAP but since then the next car will appear, the flag count will go up and up. A way to go around that is to count the number of flags within a given time period, but then again, when all the cars are catching up, it still might be too many flags within X seconds.
As far as I know, Lapper can't indicate which players causes you to get a blue flag. It would help to be able to know that Player A gets a blue flag because of Player B and if those are too many, you could apply a penalty. Then the counting starts again when Player A gets a blue flag because of Player C.
I have no idea if there's an Insim packet to get that information and if so, if Bass-Driver would be willing to implement it.
/p_30 USERNAME :give 30 second time penalty
/p_45 USERNAME :give 45 second time penalty
/p_dt USERNAME :give drive through penalty
/p_sg USERNAME :give stop-go penalty
The flags are found in lfslapper.lpr (I have version 7.0.4.10 , which isn't the latest version but in a higher version it is as well), see this:
######################################################################################### #Action on Event when player receives a Flag (Yellow/Blue flags and Lag/Missing packets)# ######################################################################################### # The Flags below returns 1 or 0 depends on which flag is received by the user #$YellowFlag: Player receives a YellowFlag #$BlueFlag : Player recieves a BlueFlag #$LagFlag : Player is lagging or is missing carpackets #$Time : ShortTimeFormat,same as GetLapperVar("ShortTime");
$PlayerFlagEvent = -1; #Enable Event 1 = ON / -1 = OFF Event OnPlayerFlags($userName,$YellowFlag,$BlueFlag,$LagFlag,$Time) # Player event /* IF( $YellowFlag == 1) THEN privmsg("^3YELLOW FLAG"); ENDIF IF( $BlueFlag == 1) THEN privmsg("^4BLUE FLAG"); ENDIF IF( $LagFlag == 1) THEN privmsg("^5LAG"); ENDIF */ EndEvent
This /* and this */ means that the code between those two signs is disabled.
Remove both of them and the code will be active on the next reload of Lapper, that can be done by typing this into the LFS chat (if you have admin rights on Lapper, that is): !reload
To get rid of "LAPPERSCRIP DEVELOPEMENT" search for this piece of code in lfslapper.lpr:
################################################# #Connect messages when a player joins the server# #################################################
Version 7.0.6.4 never made it to a public version (please correct me if I am wrong Bass-Driver) and must be considered a beta version.
If you are on 7.0.6.3 you are on the latest released version and should be able to do all you want to, including the flags we were talking about earlier in this thread.